/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * Description: Hmfs-tools main area
 */

#ifndef HMFS_COMPARE_MAIN_H
#define HMFS_COMPARE_MAIN_H

#include <memory>
#include <string>
#include <sys/types.h>

#include "compare_data.h"
#include "hmfs_fs.h"

namespace OHOS {
namespace Hmfs {
class CompareMainArea {
public:
    CompareMainArea(FsData &srcInfo, FsData &dstInfo) : srcInfo_(srcInfo), dstInfo_(dstInfo) {}
    ~CompareMainArea() = default;

    int32_t CompareMainAreaBinary();

private:
    int32_t CompareRootInode();
    int32_t CompareQfInode();
    int32_t CompareLpfInode();
    int32_t CompareNodeDataInode(NodeData *srcNodeData, NodeData *dstNodeData);
    int32_t CompareDefaultDentryBlock();
    int32_t CompareLpfDentryBlock();
    int32_t CompareDentryBlock(DentryBlock *srcDentryBlock, DentryBlock *dstDentryBlock);
    int32_t CompareQuotaData();

    FsData& srcInfo_;
    FsData& dstInfo_;
    uint64_t currentBlkId_ = 0;
};

} // namespace Hmfs
} // namespace OHOS
#endif
